sparrowfandomcom-20200215-history
HKML
How does it work? In the server settings you have an option to tell if hkml files being interpre $_FILES (not fully working atm - therefore disabled in 0.1.3) $_SERVER variables which have some vital information like referrer etc. the server accepts POST and GET requests. File transfers will be possible, but are disabled for now (the server crashes, thats why) if u ever done something in PHP, you will find, that requests posted (as well as set via get) are stored globally in $_GETVarname Variables Same with $_POSTVarname On my list of things to do with Server Variables: *header injection - so the servers' header content can be changed from within a script, *superglobals - variables, that will be accessible from different code segments on _ONE_ hkml file. Template Style Right now, doing some code like: HKML TestFile Some HTML content will simply not work - technically these are two scripts and run in seperate adress spaces. i need to resetup my IPC so server works as a variable buffer for scripts. along with that, cookie-session management and header injection will become possible. Other languages php or asp like vbs wont work, unless someone writes a wrapper for that. GUI elements i have setup a technical demo, which is also seen from the screenshot above, showing environment variables in a hkml file which were accessed at runtime of the script - not at that from server. besides each script may do whatever AHK script can do. control applications, create GUIS (no these are not send back to client, 'd be cool though ), whatever ... all GUI actions will physically happen on the server. the client only receives the html (content whatever) you sent back to it. William: Could an hkml file have a script that takes a screenshot of a gui, and place an image in the public directory of the webserver, and display that image in a ? If so, then a tedious solution might be to chop a gui up into an image map, and assign buttons to links... DerRaphael: Theoretically this might work. OTH It is not very practicable due to the nature of how webservices work in general. When a html file is requested, the server runs a script only once and when this exits the result is being returned. so when controlling an external program over web, each time the script need to run the entire procedure again (find the gui, screenshot and send). It might be a better solution to stream the content of the target window and use hkml to modify controls. GDI (Serverside Graphics) it is not working atm, but i have plans to include a demo showing how to use GDI+ libraries to dynamically create graphics on the fly and send these back to client. there is a basic interface for a plugin structure but this needs more improvement, so plugins may be loaded at runtime (enabled or disabled) Examples Have a look at the Hello World Example Category:Sparrow Category:HKML